<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const start = performance.now();
      console.log(
        Array(9999999)
          .fill(null)
          .filter((v) => !v).length
      );
      const end = performance.now();
      console.log(`耗时${end - start}ms`);
    </script>
  </body>
</html>
